import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { Eyebrow, Section } from "@/components/section"; import { posts } from "@/lib/content"; type Props = { params: Promise<{ slug: string }> }; export async function generateStaticParams() { return posts.map((p) => ({ slug: p.slug })); } export async function generateMetadata({ params }: Props): Promise { const { slug } = await params; const post = posts.find((p) => p.slug === slug); if (!post) return { title: "Insight" }; return { title: post.title, description: post.dek }; } export default async function InsightPostPage({ params }: Props) { const { slug } = await params; const post = posts.find((p) => p.slug === slug); if (!post) notFound(); return (
← Insights {post.date} · {post.reading}

{post.title}

{post.dek}

{post.paragraphs.map((para) => (

{para}

))}

{post.tags.join(" · ")}

); }